package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.DoctorStudioEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 医生工作室对象 doctor_studio
 *
 * @author ym
 * @date 2020-09-23
 */
@ApiModel("医生工作室-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DoctorStudioUpdateParam extends BeanCovert<DoctorStudioEntity> {

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
    private Long id;

    @ApiModelProperty("所属医生ID")
    private Long belongPerson;

    @ApiModelProperty("工作室名称")
    @Size(max = 50, message = "工作室名称长度超过{max}", groups = {Add.class, Update.class})
    private String dsName;

    @ApiModelProperty("工作室描述")
    @Size(max = 4000, message = "工作室描述长度超过{max}", groups = {Add.class, Update.class})
    private String description;

    @ApiModelProperty("1 开启 2 关闭")
    @Size(max = 2, message = "1开启2关闭长度超过{max}", groups = {Add.class, Update.class})
    private String state;

    @ApiModelProperty("创建时间")
    @NotNull(message = "创建时间不能为空", groups = Add.class)
    private Date createTime;

}
